#ifndef _USART_H
#define _USART_H

#include "stm32f4xx.h"

#pragma pack(1)
typedef struct 
{
	unsigned char start;
	unsigned char start1;
	float x;
	float y;
	float z;
	float pitch;
	float roll;
	float yaw;
	unsigned char sum;
	unsigned char end;
	
}OData;

typedef union
{
	char Save[28];
	OData Data;
}optitrack;
#pragma pack()




extern u8 Rx_Buf[];
void Usart2_Init(u32 br_num);
void Usart2_IRQ(void);
void Usart2_Send(unsigned char *DataToSend ,u8 data_num);

void Uart4_Init(u32 br_num);
void Uart4_IRQ(void);

void Uart5_Init(u32 br_num);
void Uart5_IRQ(void);
void Uart5_Send(unsigned char *DataToSend ,u8 data_num);

void Usart3_Init ( u32 br_num );
void Usart3_IRQ ( void );
void Usart3_Send ( unsigned char *DataToSend , u8 data_num );

void Usart1_Init ( u32 br_num );
void Usart1_IRQ ( void );
void Usart1_Send ( unsigned char *DataToSend , u8 data_num );
#endif
